home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / lists / mint / l_0799 / 506 < prev    next >
Encoding:
Internet Message Format  |  1994-08-27  |  3.8 KB

  1. Subject: misc questions/comments... and a patch (MiNT 1.09)
  2. Date: Sat, 18 Sep 93 18:07:30 CES
  3. From: Juergen Lock <nox@jelal.north.de>
  4. Message-Id: <9309181607.AA00099@jelal.north.de>
  5.  
  6. i have a few things now...
  7.  
  8. 1. what is the best way for a DEV_INSTALLd device to read a pipe to
  9. get data from a daemon process?  currently i have device_open call
  10. f_open ("u:\\pipe\\...", O_RDONLY|O_GLOBAL) thru dos_tab and then later
  11. f_read, f_cntl etc. that works but if i could somehow use FILEPTRs
  12. directly it would save at least global handles.
  13.  
  14. 2. it would be nice if a device could set its modification time...
  15. i can pass device_datime thru to the pipe but ls -l /dev (i.e. stat())
  16. doesn't seem to use that, it still prints the current time.  for you
  17. to decide if the kernel should be changed or stat on /dev should call
  18. Fdatime... (with ls -l /pipe it works btw.)  and btw it would also be
  19. nice if chmod/chown worked on devices, be it only to implement mesg n. :)
  20.  
  21. 4. MiNTs debug output can sometimes make it very difficult to get
  22. keyboard input thru to processes on the console... it gobbles up
  23. characters like no good.  here'a a patch that makes it eat chars only
  24. while ctrl+alt are down, i.e. to start/stop debug output on the console
  25. you now use ctrl-alt-<anykey>, not just any key.
  26.  
  27. --- debug.c_    Wed Sep  1 13:24:16 1993
  28. +++ debug.c    Tue Sep 14 22:42:02 1993
  29. @@ -264,15 +264,18 @@
  30.          stopped = 0;
  31.          while (1) {
  32.          /* got a key; if ctl-alt then do it */
  33. -        key = Bconin(out_device);
  34.          if (out_device == 2) {
  35.              if ((Kbshift(-1) & 0x0c) == 0x0c) {
  36. +            key = Bconin(out_device);
  37.              scan = (int) (((key >> 16) & 0xff));
  38. -            do_func_key(scan);
  39. +            if (!(char)key || ' ' < (unsigned char)key)
  40. +                do_func_key(scan);
  41. +            else goto ptoggle;
  42.              }
  43. -            else goto ptoggle;
  44. +            else goto cont;
  45.          }
  46.          else {
  47. +            key = Bconin(out_device);
  48.              if (key < '0' || key > '9') {
  49.  ptoggle:        /* not a func key */
  50.              if (stopped) break;
  51. @@ -287,6 +290,7 @@
  52.          }
  53.          }
  54.      }
  55. +cont:
  56.      s++;
  57.      }
  58.  }
  59.  
  60. 5. to use tfork for things vfork was originally introduced for ;) (i.e.
  61. nonblocking fork that shares parents address space) you currently have
  62. to reset close-on-exec flags and signals for the child... seems the
  63. kernel treats tfork more like an exec than like a fork.  if this would
  64. be changed (maybe needs a new Pexec mode?) the library could probably
  65. easily implement a `real' vfork...  (ok malloc etc still are not
  66. re-entrant(sp?) but thats another story.)
  67.  
  68. 6. is there something like a gem.prg (== start GEM) i can use with init
  69. that shuts down GEM gracefully when it gets SIGHUP?  the one i have
  70. seems to be from pre-MiNT days and doesn't know about signals.
  71. (well i don't know if its even possible to shut down GEM gracefully...
  72. maybe save all vectors GEM changes and restore them on signals?)
  73.  
  74. 7. terminal (or should i say pocket calculator :) if you know hp48...)
  75. on a serial port, stty -tandem: ^S (stopc) stops output but ^Q doesn't
  76. continue...  i.e. seems nothing in the kernel looks for startc on serial
  77. ports! :-)  (workaround: use stty tandem... but that doesn't help when
  78. the terminal/modem/whatever needs hardware handshake.)
  79.  
  80. 8. when a pipe (pty) writer exited Finstat (or ioctl FIONREAD etc)
  81. returns -1 immediately even when there still is data left in the pipe.
  82. is that correct(tm) behavior?
  83.  
  84. 9. and while we're at it...  can someone who has BSD sources online
  85. (or whatever) look what happens to a ttys process group when a pgrp
  86. leader exits?  i forgot to say that last time but just leaving it
  87. caused me problems with init, thats why i had to put the ioctl TIOCSPGRP
  88. there...
  89.  
  90.  ok and if you read up to here... the reason for the first 6 points
  91. comes with the next message. :-)
  92.  
  93.  cheers
  94.     Juergen
  95. -- 
  96. J"urgen Lock / nox@jelal.north.de / UUCP: ..!uunet!unido!uniol!jelal!nox
  97.                                 ...ohne Gewehr
  98. PGP public key fingerprint =  8A 18 58 54 03 7B FC 12  1F 8B 63 C7 19 27 CF DA 
  99.